﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MySQLApplication
{
    class cmd_ChangeDatabase : Command
    {
        public cmd_ChangeDatabase()
        {
            str_command = "dbchange";
            str_description = @"This command is used to switch MySQL databases to use other commands with.";
            str_paramNames = new string[] { "new database name" };
        }
        public override void onCall(string[] str_parameters)
        {
            try
            {
                MySQLHandler.connection.ChangeDatabase(str_parameters[1]);
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
            }
        }
    }
}
